package com.yh.patterns.state.job;

/**
 * @Author:云尚
 * @Description:抽象状态类
 */
public abstract class State {
    protected String rankName;
    protected int point;
    protected Player player;

    public String getRankName() {
        return rankName;
    }

    public void setRankName(String rankName) {
        this.rankName = rankName;
    }

    public void play_lose() {
        point-=10;
        System.out.println(rankName+"玩家"+player.getName()+"输一局，积分-10.当前积分："+point);
        checkState(point);
    }

    public void play_win(){
        point+=10;
        System.out.println(rankName+"玩家"+player.getName()+"赢一局，积分+10.当前积分："+point);
        checkState(point);
    }

    public void doubleScore() {
        System.out.println(rankName+"未解锁积分加倍");
    }

    public void changeCards(){
        System.out.println(rankName+"未解锁换牌");
    }

    public void peekCards(){
        System.out.println(rankName+"未解锁偷看牌");
    }

    public abstract void checkState(int point);
}
